home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / processes / mp threaded sort / dialogwindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  1.7 KB  |  65 lines

  1. /*
  2.     File:        DialogWindow.h
  3.  
  4.     Contains:    Interfaces of a base class for Modeless Dialogs
  5.  
  6.     Written by: Dave Falkenburg    
  7.  
  8.     Copyright:    Copyright © 1993-1999 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.                 7/27/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  20.                 11/8/94        DRF                We have better menu handling methods, so use them instead of the
  21.                                             old “DoEditMenu” method.
  22.                  10/17/94    DRF                Made ItemHit a pure virtual method.
  23.  
  24. */
  25.  
  26. #ifndef        _DIALOGWINDOW_
  27. #define        _DIALOGWINDOW_
  28.  
  29. #ifndef        _WINDOW_
  30. #include    "Window.h"
  31. #endif
  32.  
  33. #ifndef        __DIALOGS__
  34. #include    <Dialogs.h>
  35. #endif
  36.  
  37. typedef    short    DialogTemplateID;
  38. typedef    short    DialogItemID;
  39.  
  40.  
  41. class    TDialogWindow    :    public    TWindow
  42.     {
  43. private:
  44.     DialogTemplateID    fTemplateID;
  45.     
  46. public:
  47.                         TDialogWindow(DialogTemplateID theDialogTemplate);
  48.     
  49.     virtual    Boolean        EventFilter(EventRecord *theEvent);
  50.  
  51.     virtual WindowPtr    MakeNewWindow(WindowPtr behindWindow);
  52.  
  53.     virtual void        Activate(Boolean activating);
  54.     virtual void        Draw(void);
  55.     virtual void        Click(EventRecord *anEvent);
  56.  
  57.     virtual void        DoMenuSelection(short menu, short item);
  58.     
  59. //    New methods that MUST be overridden:
  60.  
  61.     virtual    void        ItemHit(short theItem) = 0;
  62.     };
  63.  
  64. #endif
  65.